<?xml version="1.0" encoding="utf-8"?><!--
  ~ Copyright (c) 2020.
  ~  This file is part of Metronome.
  ~
  ~ Metronome is free software: you can redistribute it and/or modify
  ~ it under the terms of the GNU General Public License as published by
  ~ the Free Software Foundation, either version 3 of the License, or
  ~ (at your option) any later version.
  ~
  ~ Metronome is distributed in the hope that it will be useful,
  ~ but WITHOUT ANY WARRANTY; without even the implied warranty of
  ~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  ~ GNU General Public License for more details.
  ~
  ~ You should have received a copy of the GNU General Public License
  ~ along with Metronome.  If not, see <http://www.gnu.org/licenses/>.
  ~
  -->

<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
	xmlns:tools="http://schemas.android.com/tools"
	android:layout_width="match_parent"
	android:layout_height="match_parent"
	android:background="@color/colorPrimaryDark"
	android:paddingLeft="@dimen/activity_horizontal_margin"
	android:paddingTop="@dimen/activity_vertical_margin"
	android:paddingRight="@dimen/activity_horizontal_margin"
	android:paddingBottom="@dimen/activity_vertical_margin"
	tools:context=".MetronomeActivity">

	<Button
		android:id="@+id/buttonStart"
		android:layout_width="wrap_content"
		android:layout_height="wrap_content"
		android:layout_below="@id/linearLayout3"
		android:layout_alignEnd="@id/linearLayout3"
		android:layout_alignParentStart="true"
		android:backgroundTint="@color/colorPrimaryDarker"
		android:text="@string/start" />

	<TextView
		android:id="@+id/textView"
		android:layout_width="wrap_content"
		android:layout_height="wrap_content"
		android:layout_alignParentStart="true"
		android:layout_alignParentTop="true"
		android:text="@string/bpm"
		android:textAppearance="?android:attr/textAppearanceLarge" />

	<TextView
		android:id="@+id/textViewBPM"
		android:layout_width="wrap_content"
		android:layout_height="wrap_content"
		android:layout_alignEnd="@id/buttonStart"
		android:layout_alignBottom="@id/textView"
		android:layout_alignParentTop="true"
		android:layout_toEndOf="@id/textView"
		android:gravity="center"
		android:text="Large Text"
		android:textAppearance="?android:attr/textAppearanceLarge" />

	<LinearLayout
		android:id="@+id/linearLayout"
		style="?android:attr/buttonBarStyle"
		android:layout_width="match_parent"
		android:layout_height="wrap_content"
		android:layout_below="@id/textView"
		android:layout_alignParentStart="true"
		android:layout_toEndOf="@id/textView"
		android:orientation="horizontal"
		android:paddingTop="2dp"
		android:paddingBottom="2dp">

		<Button
			android:id="@+id/buttonPlusOne"
			style="?android:attr/buttonBarButtonStyle"
			android:layout_width="wrap_content"
			android:layout_height="wrap_content"
			android:layout_weight="1"
			android:text="@string/plus_one" />

		<Button
			android:id="@+id/buttonMinusOne"
			style="?android:attr/buttonBarButtonStyle"
			android:layout_width="wrap_content"
			android:layout_height="wrap_content"
			android:layout_weight="1"
			android:text="@string/minus_one" />

		<Button
			android:id="@+id/buttonPlusTen"
			style="?android:attr/buttonBarButtonStyle"
			android:layout_width="wrap_content"
			android:layout_height="wrap_content"
			android:layout_weight="1"
			android:text="@string/plus_ten" />

		<Button
			android:id="@+id/buttonMinusTen"
			style="?android:attr/buttonBarButtonStyle"
			android:layout_width="wrap_content"
			android:layout_height="wrap_content"
			android:layout_weight="1"
			android:text="@string/minus_ten" />

		<Button
			android:id="@+id/buttonRoundUp"
			style="?android:attr/buttonBarButtonStyle"
			android:layout_width="wrap_content"
			android:layout_height="wrap_content"
			android:layout_weight="1"
			android:text="@string/round_up" />

		<Button
			android:id="@+id/buttonRoundDown"
			style="?android:attr/buttonBarButtonStyle"
			android:layout_width="wrap_content"
			android:layout_height="wrap_content"
			android:layout_weight="0"
			android:text="@string/round_down" />


	</LinearLayout>

	<TextView
		android:id="@+id/textView2"
		android:layout_width="wrap_content"
		android:layout_height="wrap_content"
		android:layout_below="@id/linearLayout"
		android:layout_alignParentStart="true"
		android:text="@string/beats_number"
		android:textAppearance="?android:attr/textAppearanceLarge" />

	<TextView
		android:id="@+id/textViewBeats"
		android:layout_width="wrap_content"
		android:layout_height="wrap_content"
		android:layout_below="@id/linearLayout"
		android:layout_alignBottom="@id/textView2"
		android:layout_alignParentEnd="true"
		android:layout_toEndOf="@id/textView2"
		android:gravity="center"
		android:text="Large Text"
		android:textAppearance="?android:attr/textAppearanceLarge" />

	<LinearLayout
		android:id="@+id/linearLayout2"
		style="?android:attr/buttonBarStyle"
		android:layout_width="match_parent"
		android:layout_height="wrap_content"
		android:layout_below="@id/textView2"
		android:layout_alignParentStart="true"
		android:orientation="horizontal"
		android:paddingTop="2dp"
		android:paddingBottom="2dp">

		<Button
			android:id="@+id/buttonBeatPlusOne"
			style="?android:attr/buttonBarButtonStyle"
			android:layout_width="wrap_content"
			android:layout_height="wrap_content"
			android:layout_weight="1"
			android:text="@string/plus_one" />

		<Button
			android:id="@+id/buttonBeatMinusOne"
			style="?android:attr/buttonBarButtonStyle"
			android:layout_width="wrap_content"
			android:layout_height="wrap_content"
			android:layout_weight="1"
			android:text="@string/minus_one" />
	</LinearLayout>

	<ToggleButton
		android:id="@+id/toggleButton"
		android:layout_width="wrap_content"
		android:layout_height="wrap_content"
		android:layout_below="@id/linearLayout2"
		android:layout_centerHorizontal="true"
		android:background="@drawable/screen_lock_toggle_button_colors"
		android:checked="false"
		android:paddingLeft="20dp"
		android:paddingRight="20dp"
		android:text="@string/keep_on"
		android:textOff="@string/keep_on"
		android:textOn="@string/keep_on"
		android:paddingTop="2dp"
		android:paddingBottom="2dp"/>


	<LinearLayout
		android:id="@+id/linearLayout3"
		android:layout_width="match_parent"
		android:layout_height="wrap_content"
		android:layout_below="@id/radiogroup"
		android:layout_marginTop="10dp"
		android:orientation="horizontal"
		android:weightSum="2"
		android:paddingTop="10dp"
		android:paddingBottom="2dp">

		<Button
			android:id="@+id/buttonTap"
			android:layout_width="wrap_content"
			android:layout_height="wrap_content"
			android:layout_weight="1"
			android:backgroundTint="@color/colorPrimaryDarker"
			android:text="@string/tap"
			style="?android:attr/buttonBarButtonStyle" />

		<Button
			android:id="@+id/buttonStopTap"
			android:layout_width="wrap_content"
			android:layout_height="wrap_content"
			android:layout_weight="1"
			android:backgroundTint="@color/colorPrimaryDarker"
			android:text="@string/stop_tap"
			style="?android:attr/buttonBarButtonStyle" />
	</LinearLayout>

	<LinearLayout
		android:id="@+id/linearLayout4"
		android:layout_width="match_parent"
		android:layout_height="wrap_content"
		android:layout_alignParentStart="true"
		android:layout_alignParentBottom="true"
		android:orientation="horizontal"
		android:weightSum="3">

		<Button
			android:id="@+id/button_delete"
			style="?android:attr/buttonBarButtonStyle"
			android:layout_width="wrap_content"
			android:layout_height="wrap_content"
			android:layout_weight="1"
			android:text="@string/delete" />

		<Button
			android:id="@+id/button_save"
			style="?android:attr/buttonBarButtonStyle"
			android:layout_width="wrap_content"
			android:layout_height="wrap_content"
			android:layout_weight="1"
			android:text="@string/save" />

		<Button
			android:id="@+id/button_restore"
			style="?android:attr/buttonBarButtonStyle"
			android:layout_width="wrap_content"
			android:layout_height="wrap_content"
			android:layout_weight="1"
			android:text="@string/restore" />

		<Button
			android:id="@+id/button_tone"
			style="?android:attr/buttonBarButtonStyle"
			android:layout_width="wrap_content"
			android:layout_height="wrap_content"
			android:layout_weight="1"
			android:text="@string/tone" />
	</LinearLayout>

	<View
		style="@style/Divider"
		android:layout_above="@id/linearLayout4"
		android:layout_alignParentStart="true" />

	<LinearLayout
		android:id="@+id/linearLayout5"
		android:layout_width="match_parent"
		android:layout_height="wrap_content"
		android:layout_below="@id/toggleButton"
		android:layout_marginTop="20dp"
		android:orientation="horizontal">

		<TextView
			android:layout_width="match_parent"
			android:layout_height="wrap_content"
			android:gravity="center"
			android:text="@string/wave_type"
			android:textAppearance="?android:attr/textAppearanceLarge" />
	</LinearLayout>

	<RadioGroup xmlns:android="http://schemas.android.com/apk/res/android"
		android:id="@+id/radiogroup"
		android:layout_width="match_parent"
		android:layout_height="wrap_content"
		android:layout_below="@id/linearLayout5"
		android:gravity="center"
		android:orientation="horizontal"
		android:weightSum="3">

		<RadioButton
			android:id="@+id/radio_sine"
			android:layout_width="wrap_content"
			android:layout_height="wrap_content"
			android:layout_weight="1"
			android:checked="true"
			android:onClick="onRadioButtonClicked"
			android:text="@string/sine" />

		<RadioButton
			android:id="@+id/radio_square"
			android:layout_width="wrap_content"
			android:layout_height="wrap_content"
			android:layout_weight="1"
			android:onClick="onRadioButtonClicked"
			android:text="@string/square" />

		<RadioButton
			android:id="@+id/radio_pwm"
			android:layout_width="wrap_content"
			android:layout_height="wrap_content"
			android:layout_weight="1"
			android:onClick="onRadioButtonClicked"
			android:text="@string/PWM" />

		<RadioButton
			android:id="@+id/radio_sawtooth"
			android:layout_width="wrap_content"
			android:layout_height="wrap_content"
			android:layout_weight="1"
			android:onClick="onRadioButtonClicked"
			android:text="@string/sawtooth" />
	</RadioGroup>


</RelativeLayout>
